<?
/**
 * GDataGridActionOptions
 */
class GDataGridLink{
	public $innerHtml=NULL;
	public $href=NULL;
	public $target=NULL;
	public $class=NULL;
	public $id=NULL;
	public $confirm=NULL;
	public $extra=NULL;
	public function __construct($innerHtml=NULL,$href=NULL,$target=NULL,$class=NULL,$id=NULL,$extra=NULL){
		$this->setInnerHtml($innerHtml);
		$this->setHref($href);
		$this->setTarget($target);
		$this->setClass($class);
		$this->setId($id);
		$this->setExtra($extra);
	}

	public function getInnerHtml(){
		return($this->innerHtml);
	}
	public function setInnerHtml($innerHtml){
		$this->innerHtml=$innerHtml;
	}

	public function getHref(){
		return($this->href);
	}
	public function setHref($href){
		$this->href=$href;
	}

	public function getTarget(){
		return($this->target);
	}
	public function setTarget($target){
		$this->target=$target;
	}

	public function getClass(){
		return($this->class);
	}
	public function setClass($class){
		$this->class=$class;
	}

	public function getId(){
		return($this->id);
	}
	public function setId($id){
		$this->id=$id;
	}

	public function getConfirm(){
		return($this->confirm);
	}
	public function setConfirm($confirm){
		$this->confirm=$confirm;
	}

	public function getExtra(){
		return($this->extra);
	}
	public function setExtra($extra){
		$this->extra=$extra;
	}

	public function toHtml(){
		$result="<a";
		$href=$this->getHref();
		if($href!==NULL){
			$result.=" href=\"".$href."\"";
		}
		$target=$this->getTarget();
		if($target!==NULL){
			$result.=" target=\"".$target."\"";
		}
		$class=$this->getClass();
		if($class!==NULL){
			$result.=" class=\"".$class."\"";
		}
		$id=$this->getId();
		if($id!==NULL){
			$result.=" id=\"".$id."\"";
		}
		$confirm=$this->getConfirm();
		if($confirm!==NULL){
			$result.=" onclick=\"return(confirm('$confirm'));\"";
		}
		$extra=$this->getExtra();
		if($extra!==NULL){
			$result.=" $extra";
		}
		$result.=">";
		$innerHtml=$this->getInnerHtml();
		if($innerHtml!==NULL){
			$result.=$innerHtml;
		}
		$result.="</a>";
		return($result);
	}
};
?>
